package cn.easybuy.service;

import cn.easybuy.entity.Order;
import cn.easybuy.entity.OrderDetail;
import cn.easybuy.entity.OrderShow;
import cn.easybuy.entity.UserAddress;

import java.sql.SQLException;
import java.util.List;

public interface OrderService {
    // 根据用户id查询订单
    List<Order> SelOrder(int id) throws SQLException;

    // 查询当前用户所有订单详情
    List<OrderShow> SelOrderPar(String serialNumber) throws SQLException;

    // 查询地址
    List<UserAddress> SelUserAddress(int id) throws SQLException;

    // 添加地址
    boolean AddUserAddress(UserAddress userAddress) throws SQLException;

    // 添加订单
    boolean AddOrder(Order order) throws SQLException;

    // 查询订单号
    int selOrder(String serialNumber) throws SQLException;

    // 添加订单详情
    boolean AddDatail(OrderDetail orderDetail) throws SQLException;
}
